﻿Imports DNP.GestionComercial.BE

Public Class BaseForm

    Public Function CargarCombo(ByVal res As RespuestaBE) As List(Of TObjeto)

        Dim lista As New List(Of TObjeto)

        Dim lst As New List(Of ParametricaBE)
        lst = CType(res.ValorRertono, List(Of ParametricaBE))

        Dim objt As New TObjeto
        objt.Codigo = ""
        objt.Descripcion = "[Seleccionar]"
        lista.Add(objt)

        For Each oParametrica As ParametricaBE In lst
            Dim obj As New TObjeto
            obj.Codigo = oParametrica.CPAR_VALOR
            obj.Descripcion = oParametrica.CPAR_NOMBRE_HIJO
            lista.Add(obj)
        Next

        Return lista

    End Function


End Class


Public Class TObjeto

    Public Property Codigo As String
    Public Property Descripcion As String

End Class